//Sunday, November 15 2009
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class EquilibriumPoints
{
public:
	vector <double> getPoints(vector <int> x, vector <int> m)
	{
		vector<double> ret;
		for(int i=0; i+1<x.size(); i++)
		{
			double left = x[i];
			double right = x[i+1];
			double mid;
			int iter = 1000;
			while(iter--)
			{
				mid = (left + right) / 2;
				double temp = 0.0;
				for(int j=0; j<=i; j++)
					temp += 1.0*m[j]/((mid-x[j])*(mid-x[j]));
				for(int j=i+1; j<x.size(); j++)
					temp -= 1.0*m[j]/((mid-x[j])*(mid-x[j]));
			//if(fabs(temp) < 1e-9) break;
				if(temp > 0.0) left = mid;
				else right = mid;
			}
			ret.push_back(mid);
		//ret.push_back(left); This also works.s
		}
		return ret;
	}
};
